package main

import "fmt"

var container = []string{"ZERO", "ONE", "TWO"}

func main() {
	container := map[int]string{0: "zero", 1: "one", 2: "two"}
	// 打印之前先要做判断，只有map或者切片类型才能通过
	_, ok1 := interface{}(container).([]string)
	_, ok2 := interface{}(container).(map[int]string)
	if !(ok1 || ok2) {
		fmt.Printf("ERROR: 类型断言失败 %T\n", container)
		return
	}
	fmt.Println(container[0], container[1], container[2])
}